package com.ruoyi.bussiness.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bussiness.mapper.StockBaseInfoMapper;
import com.ruoyi.bussiness.domain.StockBaseInfo;
import com.ruoyi.bussiness.service.IStockBaseInfoService;

/**
 * 股票基础数据Service业务层处理
 * 
 * @author wagnzy
 * @date 2025-10-30
 */
@Service
public class StockBaseInfoServiceImpl implements IStockBaseInfoService 
{
    @Autowired
    private StockBaseInfoMapper stockBaseInfoMapper;

    /**
     * 查询股票基础数据
     * 
     * @param id 股票基础数据主键
     * @return 股票基础数据
     */
    @Override
    public StockBaseInfo selectStockBaseInfoById(Long id)
    {
        return stockBaseInfoMapper.selectStockBaseInfoById(id);
    }

    /**
     * 查询股票基础数据列表
     * 
     * @param stockBaseInfo 股票基础数据
     * @return 股票基础数据
     */
    @Override
    public List<StockBaseInfo> selectStockBaseInfoList(StockBaseInfo stockBaseInfo)
    {
        return stockBaseInfoMapper.selectStockBaseInfoList(stockBaseInfo);
    }

    /**
     * 新增股票基础数据
     * 
     * @param stockBaseInfo 股票基础数据
     * @return 结果
     */
    @Override
    public int insertStockBaseInfo(StockBaseInfo stockBaseInfo)
    {
        return stockBaseInfoMapper.insertStockBaseInfo(stockBaseInfo);
    }

    /**
     * 修改股票基础数据
     * 
     * @param stockBaseInfo 股票基础数据
     * @return 结果
     */
    @Override
    public int updateStockBaseInfo(StockBaseInfo stockBaseInfo)
    {
        stockBaseInfo.setUpdateTime(DateUtils.getNowDate());
        return stockBaseInfoMapper.updateStockBaseInfo(stockBaseInfo);
    }

    /**
     * 批量删除股票基础数据
     * 
     * @param ids 需要删除的股票基础数据主键
     * @return 结果
     */
    @Override
    public int deleteStockBaseInfoByIds(Long[] ids)
    {
        return stockBaseInfoMapper.deleteStockBaseInfoByIds(ids);
    }

    /**
     * 删除股票基础数据信息
     * 
     * @param id 股票基础数据主键
     * @return 结果
     */
    @Override
    public int deleteStockBaseInfoById(Long id)
    {
        return stockBaseInfoMapper.deleteStockBaseInfoById(id);
    }
}
